<?php
/**
 * @version SVN: $Id: part.php 1108 2010-02-22 17:20:47Z elkuku $
 * @package    EasyCreator
 * @subpackage Parts
 * @author     EasyJoomla {@link http://www.easy-joomla.org Easy-Joomla.org}
 * @author     Nikolai Plath (elkuku) {@link http://www.nik-it.de NiK-IT.de}
 * @author     Created on 20-Apr-2009
 */

//-- No direct access
defined('_JEXEC') or die('=;)');

class PartViewsSimple
{
    public $group = 'views';

    /**
     * Info about the thing
     *
     * @return object ecrTemplateInfo
     */
    public function info()
    {
        $info = new EasyTemplateInfo();

        $info->group = ucfirst($this->group);
        $info->title = 'Simple View';
        $info->description = JText::_('A simple, empty, view');

        return $info;
    }//function

    /**
     * Get insert options.
     *
     * @return void|boolean false on error
     */
    function getOptions()
    {
        ecrHTML::drawSelectScope();
        ecrHTML::drawSelectName();

        ecrHTML::drawLoggingOptions();

        $requireds = array('element_name', 'element_scope');
        ecrHTML::drawSubmitParts($requireds);

    }//function

    /**
     * Inserts the part into the project.
     *
     * @param object $easyProject EasyProject - The project.
     * @param array $options Insert options.
     * @param object $logger EasyLogger.
     * @return boolean
     */
    function insert($easyProject, $options, $logger)
    {
        $easyProject->addSubstitute('_ECR_SUBPACKAGE_', 'Views');

        return $easyProject->insertPart($options, $logger);
    }//function

}//class
